package com.woniuxy.store.core.mapper;

import com.woniuxy.store.core.model.PmComplain;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.woniuxy.store.core.vo.ComplainVo;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author gmx
 * @since 2021-07-06
 */
public interface PmComplainMapper extends BaseMapper<PmComplain> {
    @Select("SELECT c.id,c.context,c.createtime,oi.id AS itemId,oi.order_id AS orderId,oi.quantity,oi.ordertype,oi.img,oi.`name`,oi.price,oi.sell_price,oi.size,oi.first_id FROM pm_complain c,pl_orderitem oi WHERE c.order_id=oi.id and store_id=#{storeId}")
    List<ComplainVo> selectComplain(Integer storeId);


}
